﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Upeu.Matricula.Data.Entities;

namespace Upeu.Matricula.Data.Mappings
{
    public class CuentaMap : EntityTypeConfiguration<Cuenta>
    {
        public CuentaMap()
        {
            ToTable("cuenta");

            HasKey(t => t.Cuenta_Id);
            Property(t => t.Cuenta_Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);


            Property(t => t.Descripcion).IsRequired();
            Property(t => t.MontoTotal).IsRequired();
            Property(t => t.Moneda).IsRequired();
            Property(t => t.FechaVencimiento).IsRequired();
        }
    }
}
